/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;

/**
 *
 * @author wei
 */
@Entity(name="Refund")
public class RefundEntity extends DataObjectEntity implements Serializable {
    private double cashInAdvanceAmount;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date refundDate;

    @OneToOne
    private RefundRequestEntity refundRequest;
    @ManyToOne
    private CustomerAccountEntity customerAccount;

    public RefundEntity() {
        super();
    }

    public double getCashInAdvanceAmount() {
        return cashInAdvanceAmount;
    }

    public void setCashInAdvanceAmount(double cashInAdvanceAmount) {
        this.cashInAdvanceAmount = cashInAdvanceAmount;
    }

    public CustomerAccountEntity getCustomerAccount() {
        return customerAccount;
    }

    public void setCustomerAccount(CustomerAccountEntity customerAccount) {
        this.customerAccount = customerAccount;
    }

    public RefundRequestEntity getRefundRequest() {
        return refundRequest;
    }

    public void setRefundRequest(RefundRequestEntity refundRequest) {
        this.refundRequest = refundRequest;
    }

    public Date getRefundDate() {
        return refundDate;
    }

    public void setRefundDate(Date refundDate) {
        this.refundDate = refundDate;
    }

    @Override
    public String childToString() {
        return "RefundEntity{" + "cashInAdvanceAmount=" + cashInAdvanceAmount + ", refundRequest=" + refundRequest + ", customerAccount=" + customerAccount + '}';
    }
    
}
